<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>资产录入</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script type="text/javascript" src="../frame/assets/js/lib/jquery.min.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="../frame/layui/lay/modules/layer.js"></script>
    <link rel="stylesheet" href="../frame/layui/lay/modules/layer/default/layer.css">
    <link rel="stylesheet" href="../frame/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="../frame/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/themify-icons.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/unix.css">
    <link rel="stylesheet" href="../frame/assets/css/style.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/menubar/sidebar.css">
    <link rel="stylesheet" href="../frame/assets/css/lib/sweetalert/sweetalert.css">
    <style>
        .dd{
            color:#ff0000;
            padding-left:30px;
            front-size:12px;
        }
    </style>
</head>

<body style="margin-left:25%;height: 1200px;">
<!--内容-->
<div class="content-wrap" >
    <div class="main">
        <div class="container-fluid">
            <!--欢迎栏-->
            <div class="row">
                <div class="col-lg-8 p-r-0 title-margin-right">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>资产借调登记</h1>

                        </div>
                    </div>
                </div>
            </div>

            <h4><i class="layui-icon layui-icon-face-smile" style="font-size: 30px; color: #1E9FFF;"></i>  借调登记</h4><br><br>
            <div class="layui-text" style="font-size:18px">

                <label>资产名称&nbsp;：</label>
                <input type="text" name="sname" id="sname" onblur="check2()">
                <div class="dd" id="p2"></div>
                <label>例如&nbsp;：空调，电脑</label>
                <br><br>
                <label>审核人&nbsp;：&nbsp;&nbsp;&nbsp;</label>
                <input type="text" name="sperson" id="sperson" onblur="check3()">
                <div class="dd" id="p3"></div>
                <label>例如&nbsp;：张三/李四</label>
                <br><br>
                <label>借调人&nbsp;：&nbsp;&nbsp;&nbsp;</label>
                <input type="text" name="speople" id="speople" onblur="check4()">
                <div class="dd" id="p4">
                </div>
                <label>例如&nbsp;：张三/李四</label>
                <br><br>
                <label>资产状态&nbsp;：</label>
                <input type="text" name="zczt" id="zczt" onblur="check5()">
                <div class="dd" id="p5">
                </div>
                <label>例如&nbsp;：良好/损坏</label>
                <br><br>
                <label>借用日期&nbsp;：</label>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input type="text" name="sbegint" id="sbegint" lay-verify="date"  autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="dd" id="p6"></div>
                <label>例如&nbsp;：2021-08-31(xxxx-xx-xx)</label>
                <br><br>
                <label>状态&nbsp;&nbsp;&nbsp;&nbsp;：&nbsp;&nbsp;&nbsp;&nbsp;</label>
                <input type="text" name="scondition" id="scondition" onblur="check7()">
                <div class="dd" id="p7"></div>
                <label>例如&nbsp;：(已借出/未借出)</label>
                <br><br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;


                <input type="submit" id="submit" onclick="submitp()">
            </div>
        </div>
    </div>
</div>
<!--搜索-->
<div id="search">
    <button type="button" class="close">×</button>
    <form>
        <input type="search" value="" placeholder="type keyword(s) here" />
        <button type="submit" class="btn btn-primary">Search</button>
    </form>
</div>
</body>
<script src="../frame/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="../frame/assets/js/lib/menubar/sidebar.js"></script>
<script src="../frame/assets/js/lib/bootstrap.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/dataTables.buttons.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.flash.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/jszip.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/pdfmake.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/vfs_fonts.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.html5.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/buttons.print.min.js"></script>
<script src="../frame/assets/js/lib/data-table2/datatables-init2.js"></script>
<script src="../frame/assets/js/lib/sweetalert/sweetalert.min.js"></script>
<script src="../frame/assets/js/lib/sweetalert/zhuxiao.js"></script>
<script src="../frame/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript">
    layui.use(['laydate'], function(){
        var laydate = layui.laydate;
        laydate.render({
            elem: '#sbegint'
        });

    });
    function submitp(){

        var id=$("#id").val();
        var sname=$("#sname").val();
        var sperson=$("#sperson").val();
        var speople=$("#speople").val();
        var zczt=$("#zczt").val();
        var sbegint=$("#sbegint").val();
        var scondition=$("#scondition").val();
        $.ajax({
            type:'get',
            url:"/adduproduct" ,
            contentType:'application/json;charset=utf-8',
            dataType:'html',
            data:{
                'id':id,
                'sname':sname,
               'sperson':sperson,
               'speople':speople,
               'zczt':zczt,
              'sbegint':sbegint,
                 'scondition':scondition
            },
            success:function(res){
                layer.msg("添加成功!");
                alert("成功");
            },
            error:function(res){
                layer.msg("添加失败！");
                alert("失败");
            }
        })

    }

</script>
</html>
